clear all
close all
AngleIn = (0:.01:2*pi);
Inx = (AngleIn/2*pi).*cos(AngleIn);
Iny = (AngleIn/2*pi).*sin(AngleIn);

for ii = 1:length(Inx)
    Deltay = Iny(ii);
    Deltax = Inx(ii);
         if     ((Deltay >= 0 ) && (Deltax >= 0 ))
            thetar = atan(abs(Deltay/Deltax)) ;
         elseif ((Deltay >= 0 ) && (Deltax < 0 ))
            thetar = atan(abs(Deltax/Deltay)) + 1*pi/2;
         elseif ((Deltay < 0 ) && (Deltax >= 0 ))
            thetar = atan(abs(Deltax/Deltay)) + 3*pi/2;
         elseif ((Deltay < 0 ) && (Deltax < 0 ))
            thetar = atan(abs(Deltay/Deltax)) + 2*pi/2;
         end
    xmeasure(ii) = (AngleIn(ii)/2*pi).*cos(thetar);
    ymeasure(ii) = (AngleIn(ii)/2*pi).*sin(thetar);
end

figure(100)
plot(Inx,Iny,'r.'); hold on;
plot(xmeasure,ymeasure,'bo');



